Go to the source code of this file.
◆ clCCapsule_LogLevel
◆ clCDeviceLocator_DeviceListHandler
Device callback for the list of device info.
◆ clCDeviceLocator_FailReason
◆ clCCapsule_LogLevel
| Enumerator |
|---|
| clCCapsule_LogLevel_Trace | |
| clCCapsule_LogLevel_Debug | |
| clCCapsule_LogLevel_Info | |
| clCCapsule_LogLevel_Warn | |
| clCCapsule_LogLevel_Err | |
| clCCapsule_LogLevel_Critical | |
| clCCapsule_LogLevel_Off | |
◆ clCDeviceLocator_FailReason
Device locator error.
| Enumerator |
|---|
| clCDeviceLocator_FailReason_OK | No error.
|
| clCDeviceLocator_FailReason_BluetoothDisabled | Bluetooth adapter not found or disabled.
|
| clCDeviceLocator_FailReason_Unknown | Unknown error.
|
◆ CLC_CLASS_WN()
| CLC_CLASS_WN |
( |
DeviceLocatorPrivate | , |
|
|
clCDeviceLocator | ) |
◆ clCCapsule_GetLogLevel()
Get current filter log level of Capsule
- Returns
- log level
◆ clCCapsule_GetVersionString()
| CL_DLL const char * clCCapsule_GetVersionString |
( |
| ) |
|
◆ clCCapsule_SetLogLevel()
Set log level to filter Capsule's log messages
◆ clCCapsule_SetSingleThreaded()
| CL_DLL void clCCapsule_SetSingleThreaded |
( |
bool | singleThreaded | ) |
|
By default Capsule API operates in multi threaded mode - event callbacks are fired in a background thread. Call this function once before working with Capsule to initiate single-thread mode. In order for Capsule to work in this mode, clCDeviceLocator_Update must be called periodically on the main thread. The event callbacks will be called inside clCDeviceLocator_Update.
◆ clCDeviceLocator_Create()
Create device locator. Log files will not be created
- Parameters
-
- Returns
- device locator handle
◆ clCDeviceLocator_CreateWithLogDirectory()
| CL_DLL clCDeviceLocator clCDeviceLocator_CreateWithLogDirectory |
( |
const char * | logDirectory, |
|
|
clCError * | error ) |
Create device locator with directory to store log files of Capsule
- Parameters
-
| error | out error parameter |
| logDirectory | path to a folder where Capsule logs will be stored |
- Returns
- device locator handle
◆ clCDeviceLocator_Destroy()
| CL_DLL void clCDeviceLocator_Destroy |
( |
clCDeviceLocator | locator | ) |
|
Release device locator.
- Parameters
-
| locator | device locator handle |
◆ clCDeviceLocator_RequestDevices()
| CL_DLL void clCDeviceLocator_RequestDevices |
( |
clCDeviceLocator | locator, |
|
|
clCDeviceType | deviceType, |
|
|
int32_t | searchTime, |
|
|
clCError * | error ) |
Find available devices. Search time is in seconds. Searches for available devices of chosen type. Non-blocking - OnDevices event is fired when timeout expires.
- Parameters
-
| locator | device locator handle |
| deviceType | device type |
| searchTime | search time in seconds |
| error | out parameter for error |
◆ clCDeviceLocator_SetOnDeviceListEvent()
Subscribe for device list
- Parameters
-
| locator | device locator handle |
◆ clCDeviceLocator_Update()
| CL_DLL void clCDeviceLocator_Update |
( |
clCDeviceLocator | locator | ) |
|
This function should ONLY be called in single-threaded mode. In this mode it should be called periodically from the main thread to fire event callbacks.
- Parameters
-
| locator | device locator handle |